'\" t
.\"     Title: mysqlsh
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\"      Date: 06/03/2022
.\"    Manual: MySQL Database System
.\"    Source: MySQL 8.0
.\"  Language: English
.\"
.TH "MYSQLSH" "1" "06/03/2022" "MySQL 8\&.0" "MySQL Database System"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mysqlsh \- the MySQL shell
.SH "SYNOPSIS"
.HP \w'\fBmysqlsh\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\ 'u
\fBmysqlsh [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR
.SH "DESCRIPTION"
.PP
MySQL Shell is an advanced command\-line client and code editor for MySQL\&. In addition to SQL, MySQL Shell also offers scripting capabilities for JavaScript and Python\&. For information about using MySQL Shell, see
MySQL Shell 8.0\&. When MySQL Shell is connected to the MySQL Server through the X Protocol, the X DevAPI can be used to work with both relational and document data, see
\m[blue]\fBUsing MySQL as a Document Store\fR\m[]\&\s-2\u[1]\d\s+2\&. MySQL Shell includes the AdminAPI that enables you to work with InnoDB Cluster, InnoDB ClusterSet, and InnoDB ReplicaSet deployments; see
Chapter\ \&6, MySQL AdminAPI\&.
.PP
Many of the options described here are related to connections between MySQL Shell and a MySQL Server instance\&. See
Section\ \&4.3, \(lqMySQL Shell Connections\(rq
for more information\&.
.PP
\fBmysqlsh\fR
supports the following command\-line options\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-help\fR,
\fB\-?\fR
.sp
Display a help message and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-\fR
.sp
Marks the end of the list of mysqlsh options and the start of a command and its arguments for MySQL Shell\*(Aqs API command line integration\&. You can execute methods of the MySQL Shell global objects from the command line using this syntax:
.sp
.if n \{\
.RS 4
.\}
.nf
mysqlsh [\fIoptions\fR]  \-\- \fIobject\fR \fImethod\fR [\fIarguments\fR]
.fi
.if n \{\
.RE
.\}
.sp
See
Section\ \&5.8, \(lqAPI Command Line Integration\(rq
for more information\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-auth\-method=\fR\fB\fImethod\fR\fR
.sp
Authentication method to use for the account\&. Depends on the authentication plugin used for the account\*(Aqs password\&. For MySQL Shell connections using classic MySQL protocol, specify the name of the authentication plugin, for example
caching_sha2_password\&. For MySQL Shell connections using X Protocol, specify one of the following options:
.PP
AUTO
.RS 4
Let the library select the authentication method\&.
.RE
.PP
FALLBACK
.RS 4
Let the library select the authentication method, but do not use any authentication method that is not compatible with MySQL 5\&.7\&.
.RE
.PP
FROM_CAPABILITIES
.RS 4
Let the library select the authentication method, using the capabilities announced by the server instance\&.
.RE
.PP
MYSQL41
.RS 4
Use the challenge\-response authentication protocol supported by MySQL 4\&.1 and later, which does not send a plaintext password\&. This option is compatible with accounts that use the
mysql_native_password
authentication plugin\&.
.RE
.PP
PLAIN
.RS 4
Send a plaintext password for authentication\&. Use this option only wih encrypted connections\&. This option can be used to authenticate with cached credentials for an account that uses the
caching_sha2_password
authentication plugin, provided there is an SSL connection\&. See
\m[blue]\fBUsing X Plugin with the Caching SHA\-2 Authentication Plugin\fR\m[]\&\s-2\u[2]\d\s+2\&.
.RE
.PP
SHA256_MEMORY
.RS 4
Authenticate using a hashed password stored in memory\&. This option can be used to authenticate with cached credentials for an account that uses the
caching_sha2_password
authentication plugin, where there is a non\-SSL connection\&. See
\m[blue]\fBUsing X Plugin with the Caching SHA\-2 Authentication Plugin\fR\m[]\&\s-2\u[2]\d\s+2\&.
.RE
.sp
For MySQL Shell connections using classic MySQL protocol, specify the name of the authentication plugin used by the user account, for example
caching_sha2_password
(which is the default for user accounts created in MySQL 8\&.0)\&. MySQL Shell uses the MySQL client library for client\-side authentication for these connections\&. The following authentication methods require additional configuration:
.PP
clear_text_password
.RS 4
The
mysql_clear_password
client\-side plugin is required for simple LDAP authentication\&. It is built in to the MySQL client library, but for security it is not enabled by default\&. From MySQL Shell 8\&.0\&.27, MySQL Shell enables and uses the plugin when you specify it with the
\fB\-\-auth\-method=clear_text_password\fR
connection option\&. This authentication type is only suitable for a secure connection that uses SSL or sockets, so you must configure the secure connection before using it\&. Note that with the option
ssl\-mode=preferred, the SSL connection is not guaranteed, so a connection with this option set is not considered to be an SSL connection\&. For more information, see
Section\ \&4.3.3, \(lqUsing Encrypted Connections\(rq\&.
.RE
.PP
authentication_ldap_sasl_client
.RS 4
The
authentication_ldap_sasl_client
client\-side plugin is for SASL\-based LDAP authentication, including GSSAPI/Kerberos authentication\&. It is not built in to the MySQL client library, but it is shipped in the MySQL Server packages\&. To load it, you must use the
\fB\-\-mysql\-plugin\-dir\fR
option (available from MySQL Shell 8\&.0\&.27) to specify a path to the plugin in the MySQL Server packages\&.
.RE
.PP
authentication_kerberos_client
.RS 4
The
authentication_kerberos_client
client\-side plugin is for Kerberos authentication\&. It is not built in to the MySQL client library, but it is shipped in the MySQL Server packages\&. To load it, you must use the
\fB\-\-mysql\-plugin\-dir\fR
option (available from MySQL Shell 8\&.0\&.27) to specify a path to the plugin in the MySQL Server packages\&.
.RE
.sp
Cached ticket\-granting tickets (TGTs) for Kerberos authentication are supported from MySQL 8\&.0\&.27 when the
\fB\-\-auth\-method\fR
option is used to specify the
authentication_ldap_sasl_client
or
authentication_kerberos_client
plugin, and the
\fB\-\-mysql\-plugin\-dir\fR
option is used to provide a path to the plugin\&. To use cached TGTs, do not specify a user and password in the connection options\&. When you specify one of these plugins and do not specify a user and password, MySQL Shell does not supply the system user name, does not prompt for a password, and does not attempt to use the Secret Store helper to retrieve or store credentials\&.
.sp
For more information, see
Section\ \&4.3.4, \(lqUsing LDAP and Kerberos Authentication\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-cluster\fR
.sp
Ensures that the target server is part of an InnoDB Cluster and if so, sets the
cluster
global variable to the cluster object\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-column\-type\-info\fR
.sp
In SQL mode, before printing the returned result set for a query, print metadata for each column in the result set, such as the column type and collation\&.
.sp
The column type is returned as both the type used by MySQL Shell (Type), and the type used by the original database (DBType)\&. For MySQL Shell connections using classic MySQL protocol,
DBType
is as returned by the protocol, and for X Protocol connections,
DBType
is inferred from the available information\&. The column length (Length) is returned in bytes\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-compress[={required|preferred|disabled}]\fR,
\fB\-C [{required|preferred|disabled}]\fR
.sp
Controls compression of information sent between the client and the server using this connection\&. In MySQL Shell 8\&.0\&.14 through 8\&.0\&.19 this option is available for classic MySQL protocol connections only, and does not use the options
required,
preferred, and
disabled\&. In those releases, when you specify
\fB\-\-compress\fR, compression is activated if possible\&. From MySQL Shell 8\&.0\&.20 it is also available for X Protocol connections, and you can optionally specify
required,
preferred, or
disabled\&. When just
\fB\-\-compress\fR
is specified from MySQL Shell 8\&.0\&.20, the meaning is
\fB\-\-compress=required\fR\&. See
Section\ \&4.3.6, \(lqUsing Compressed Connections\(rq
for information on using MySQL Shell\*(Aqs compression control in all releases\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-connect\-timeout=\fR\fB\fIms\fR\fR
.sp
Configures how long MySQL Shell waits (in milliseconds) to establish a global session specified through command\-line arguments\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-credential\-store\-helper=\fR\fB\fIhelper\fR\fR
.sp
The Secret Store Helper that is to be used to store and retrieve passwords\&. See
Section\ \&4.4, \(lqPluggable Password Store\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-database=\fR\fB\fIname\fR\fR,
\fB\-D \fR\fB\fIname\fR\fR
.sp
The default schema to use\&. This is an alias for
\fB\-\-schema\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-dba=enableXProtocol\fR
.sp
Enable X Plugin on connection with a MySQL 5\&.7 server, so that you can use X Protocol connections for subsequent connections\&. Requires a connection using classic MySQL protocol\&. Not relevant for MySQL 8\&.0 servers, which have X Plugin enabled by default\&. Deprecated.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-dba\-log\-sql[=0|1|2]\fR
.sp
Log SQL statements that are executed by AdminAPI operations (excluding sandbox operations)\&. By default, this category of statement is not written to the MySQL Shell application log file or sent to the console as verbose output, even when the
\fB\-\-log\-level\fR
and
\fB\-\-verbose\fR
options are set\&. The value of the option is an integer in the range from 0 to 2\&. 0 does not log or display this category of statement, which is the default behavior if you do not specify the option\&. 1 logs SQL statements that are executed by AdminAPI operations, with the exceptions of
SELECT
statements and
SHOW
statements (this is the default setting if you specify the option on the command line without a value)\&. 2 logs SQL statements that are executed by regular AdminAPI operations in full, including
SELECT
and
SHOW
statements\&. See
Chapter\ \&12, MySQL Shell Logging and Debug
for more information\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-dbpassword[=\fR\fB\fIpassword\fR\fR\fB]\fR
.sp
Deprecated in version 8\&.0\&.13 of MySQL Shell\&. Use
\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR
instead\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-dbuser=\fR\fB\fIuser_name\fR\fR
.sp
Deprecated in version 8\&.0\&.13 of MySQL Shell\&. Use
\fB\-\-user=\fR\fB\fIuser_name\fR\fR
instead\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-execute=\fR\fB\fIcommand\fR\fR,
\fB\-e \fR\fB\fIcommand\fR\fR
.sp
Execute the command using the currently active language and quit\&. This option is mutually exclusive with the
\fB\-\-file=\fR\fB\fIfile_name\fR\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-fido\-register\-factor\fR
.sp
The factor or factors for which FIDO device registration must be performed\&. This option value must be a single value, or two values separated by commas\&. Each value must be 2 or 3, so the permitted option values are \*(Aq2\*(Aq, \*(Aq3\*(Aq, \*(Aq2,3\*(Aq and \*(Aq3,2\*(Aq\&. For example:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBmysqlsh \-\-user=user_name \-\-password1 \-\-fido\-register\-factor=2\fR
Enter password: \fI(enter factor 1 password)\fR
.fi
.if n \{\
.RE
.\}
.sp
To register an account for passwordless authentication, with the FIDO device being the only authentication, you use
\fB\-\-fido\-register\-factor=2\fR
to provide the temporary password\&. The server moves FIDO authentication to the first factor after registration succeeds\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
MySQL Shell prompts for a password if you do not specify one when connecting to the server\&. After you set up passwordless authentication with a FIDO device, use one of the following methods to bypass the password prompt when you make a connection:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Specify the connection option
\fB\-\-no\-password\fR, or
\fB\-\-password=\fR
with an empty value\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Place a colon (:) after the user name in the connection string, for example:
mysqlsh user_name:@localhost
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Press Enter when the password prompt appears\&.
.RE
.sp .5v
.RE
MySQL Shell\(cqs
\fB\-\-fido\-register\-factor\fR
option works in the same way as the
\fBmysql\fR
client option\&. For more details and instructions, see
\m[blue]\fBFIDO Pluggable Authentication\fR\m[]\&\s-2\u[3]\d\s+2\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-file=\fR\fB\fIfile_name\fR\fR,
\fB\-f \fR\fB\fIfile_name\fR\fR
.sp
Specify a file to process in Batch mode\&. Any options specified after this are used as arguments of the processed file\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-force\fR
.sp
Continue processing in SQL and Batch modes even if errors occur\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-histignore=\fR\fB\fIstrings\fR\fR
.sp
Specify strings that are not added to the MySQL Shell history\&. Strings are separated by a colon\&. Matching is case insensitive, and the wildcards * and ? can be used\&. The default ignored strings are specified as
\(lq*IDENTIFIED*:*PASSWORD*\(rq\&. See
Section\ \&5.5, \(lqCode History\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
Connect to the MySQL server on the given host\&. On Windows, if you specify
\-\-host=\&.
or
\-h \&.
(giving the host name as a period), MySQL Shell connects using the default named pipe (which has the name
MySQL), or an alternative named pipe that you specify using the
\fB\-\-socket\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-get\-server\-public\-key\fR
.sp
MySQL Shell equivalent of
\fB\-\-get\-server\-public\-key\fR\&.
.sp
If
\fB\-\-server\-public\-key\-path=\fR\fB\fIfile_name\fR\fR
is given and specifies a valid public key file, it takes precedence over
\fB\-\-get\-server\-public\-key\fR\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBImportant\fR
.ps -1
.br
Only supported with classic MySQL protocol connections\&.
.sp .5v
.RE
See
\m[blue]\fBCaching SHA\-2 Pluggable Authentication\fR\m[]\&\s-2\u[4]\d\s+2\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-import\fR
.sp
Import JSON documents from a file or standard input to a MySQL Server collection or relational table, using the JSON import utility\&. For instructions, see
Section\ \&11.2, \(lqJSON Import Utility\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-interactive[=full]\fR,
\fB\-i\fR
.sp
Emulate Interactive mode in Batch mode\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-js\fR,
\fB\-\-javascript\fR
.sp
Start in JavaScript mode\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-json[={off|pretty|raw}]\fR
.sp
Controls JSON wrapping for MySQL Shell output from this session\&. This option is intended for interfacing MySQL Shell with other programs, for example as part of testing\&. For changing query results output to use the JSON format, see
\fB\-\-result\-format\fR\&.
.sp
When the
\fB\-\-json\fR
option has no value or a value of
pretty, the output is generated as pretty\-printed JSON\&. With a value of
raw, the output is generated in raw JSON format\&. In any of these cases, the
\fB\-\-result\-format\fR
option and its aliases and the value of the
resultFormat
MySQL Shell configuration option are ignored\&. With a value of
off, JSON wrapping does not take place, and result sets are output as normal in the format specified by the
\fB\-\-result\-format\fR
option or the
resultFormat
configuration option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-log\-file=\fR\fB\fIpath\fR\fR
.sp
Change the location of the MySQL Shell application log file
mysqlsh\&.log
for this MySQL Shell instance\&. The default location for the application log file is the user configuration path, which defaults to
%APPDATA%\eMySQL\emysqlsh\e
on Windows or
~/\&.mysqlsh/
on Unix\&. You can override the user configuration path for all MySQL Shell instances by defining the environment variable
MYSQLSH_USER_CONFIG_HOME\&. The
\fB\-\-log\-file\fR
option applies to the individual MySQL Shell instance, meaning that different instances can write to different locations\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-log\-level=\fR\fB\fIN\fR\fR
.sp
Change the logging level for the MySQL Shell application log file
mysqlsh\&.log, or disable logging to the file\&. The option requires a value, which can be either an integer in the range from 1 to 8, or one of
none,
internal,
error,
warning,
info,
debug,
debug2, or
debug3\&. Specifying 1 or
none
disables logging to the application log file\&. Level 5 (info) is the default if you do not specify this option\&. See
Chapter\ \&12, MySQL Shell Logging and Debug\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-ma\fR
.sp
Deprecated in version 8\&.0\&.13 of MySQL Shell\&. Automatically attempts to use X Protocol to create the session\*(Aqs connection, and falls back to classic MySQL protocol if X Protocol is unavailable\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-mysql\fR,
\fB\-\-mc\fR
.sp
Sets the global session created at start up to use a classic MySQL protocol connection\&. The
\fB\-\-mc\fR
option with two hyphens replaces the previous single hyphen
\fB\-mc\fR
option from MySQL Shell 8\&.0\&.13\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-mysql\-plugin\-dir=\fR\fB\fIpath\fR\fR
.sp
Sets a non\-persistent path to the client\-side authentication plugins by overriding the value of the
shell\&.options\&.mysqlPluginDir
setting\&. Client\-side plugins are shipped in the MySQL Server packages and can be located relative to the MySQL base directory (the value of the
basedir
system variable)\&. For example:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
C:\eprogram files\emysql\emysql Server 8\&.0\elib\eplugin
on Windows host types
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
/usr/local/mysql/lib/plugin
on Linux host types
.RE
.sp
For a list of the client authentication plugins that ship with the server, see
\m[blue]\fBAvailable Authentication Plugins\fR\m[]\&\s-2\u[5]\d\s+2\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-mysqlx\fR,
\fB\-\-mx\fR
.sp
Sets the global session created at start up to use an X Protocol connection\&. The
\fB\-\-mx\fR
option with two hyphens replaces the previous single hyphen
\fB\-mx\fR
option from MySQL Shell 8\&.0\&.13\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-name\-cache\fR
.sp
Enable automatic loading of table names based on the active default schema\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-no\-name\-cache\fR,
\fB\-A\fR
.sp
Disable loading of table names for autocompletion based on the active default schema and the DevAPI
db
object\&. Use
\erehash
to reload the name information manually\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-no\-password\fR
.sp
When connecting to the server, if the user has a passwordless account, which is insecure and not recommended, or if socket peer\-credential authentication is in use (for Unix socket connections), you must use
\fB\-\-no\-password\fR
to explicitly specify that no password is provided and the password prompt is not required\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-no\-wizard\fR,
\fB\-nw\fR
.sp
Disables the interactive wizards provided by operations such as creating connections,
dba\&.configureInstance(),
\fICluster\fR\&.rebootClusterFromCompleteOutage()
and so on\&. Use this option when you want to script MySQL Shell and not have the interactive prompts displayed\&. For more information see
Section\ \&5.6, \(lqBatch Code Execution\(rq
and
Section\ \&5.8, \(lqAPI Command Line Integration\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-pager=\fR\fB\fIname\fR\fR
.sp
The external pager tool used by MySQL Shell to display text output for statements executed in SQL mode and other selected commands such as online help\&. If you do not set a pager, the pager specified by the
PAGER
environment variable is used\&. See
Section\ \&4.6, \(lqUsing a Pager\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-passwords\-from\-stdin\fR
.sp
Read the password from standard input, rather than from the terminal\&. This option does not affect any other password behaviors, such as the password prompt\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
\fB\-p\fR\fB\fIpassword\fR\fR
.sp
The password to use when connecting to the server\&. The maximum password length that is accepted for connecting to MySQL Shell is 128 characters\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-password=\fR\fB\fIpassword\fR\fR
(\fB\-p\fR\fB\fIpassword\fR\fR) with a value supplies a password to be used for the connection\&. With the long form
\fB\-\-password=\fR, you must use an equals sign and not a space between the option and its value\&. With the short form
\fB\-p\fR, there must be no space between the option and its value\&. If a space is used in either case, the value is not interpreted as a password and might be interpreted as another connection parameter\&.
.sp
Specifying a password on the command line should be considered insecure\&. See
\m[blue]\fBEnd\-User Guidelines for Password Security\fR\m[]\&\s-2\u[6]\d\s+2\&. You can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-password\fR
with no value and no equal sign, or
\fB\-p\fR
without a value, requests the password prompt\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-password=\fR
with an empty value has the same effect as
\fB\-\-no\-password\fR, which specifies that the user is connecting without a password\&. When connecting to the server, if the user has a passwordless account, which is insecure and not recommended, or if socket peer\-credential authentication is in use (for Unix socket connections), you must use one of these methods to explicitly specify that no password is provided and the password prompt is not required\&.
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-password1[=\fR\fB\fIpassword\fR\fR\fB]\fR
.sp
\fB\-\-password1\fR,
\fB\-\-password2\fR
and
\fB\-\-password3\fR
are the passwords to use for accounts that require multifactor authentication\&. You can supply up to three passwords\&. The options work in the same way as the
\fB\-\-password\fR
option, and
\fB\-\-password1\fR
is treated as equivalent to that option\&. You can specify a password value following the option on the command line (which is insecure), or if the options are given without a password value, MySQL Shell prompts the user for each password in turn\&. These options are available from MySQL Shell 8\&.0\&.28, where they are only supported for classic MySQL protocol connections made using command\-line arguments\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-password2[=\fR\fB\fIpassword\fR\fR\fB]\fR
.sp
The password for the second authentication method for accounts that require multifactor authentication\&. See the description for the
\fB\-\-password1\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-password3[=\fR\fB\fIpassword\fR\fR\fB]\fR
.sp
The password for the third authentication method for accounts that require multifactor authentication\&. See the description for the
\fB\-\-password1\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-port=\fR\fB\fIport_num\fR\fR,
\fB\-P \fR\fB\fIport_num\fR\fR
.sp
The TCP/IP port number to use for the connection\&. The default is port 33060\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-py\fR,
\fB\-\-python\fR
.sp
Start in Python mode\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-pym\fR
.sp
Execute the specified Python module as a script in MySQL Shell\*(Aqs Python mode\&.
\fB\-\-pym\fR
works in the same way as Python\*(Aqs
\-m
command line option\&. This option is available from MySQL Shell 8\&.0\&.22\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-quiet\-start[=1|2]\fR
.sp
Start without printing introductory information\&. MySQL Shell normally prints information about the product, information about the session (such as the default schema and connection ID), warning messages, and any errors that are returned during startup and connection\&. When you specify
\fB\-\-quiet\-start\fR
with no value or a value of 1, information about the MySQL Shell product is not printed, but session information, warnings, and errors are printed\&. With a value of 2, only errors are printed\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-recreate\-schema\fR
.sp
Drop and recreate the schema that was specified in the connection options, either as part of a URI\-like connection string or using the
\fB\-\-schema\fR,
\fB\-\-database\fR, or
\fB\-D\fR
option\&. The schema is deleted if it exists\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-redirect\-primary\fR
.sp
Ensures that the target server is part of an InnoDB Cluster or InnoDB ReplicaSet and if it is not the primary, finds the primary and connects to it\&. MySQL Shell exits with an error if any of the following is true when using this option:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
No instance is specified
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
On an InnoDB Cluster, Group Replication is not active
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
InnoDB Cluster metadata does not exist
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
There is no quorum
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-replicaset\fR
.sp
Ensures that the target server belongs to an InnoDB ReplicaSet, and if so, populates the
rs
global variable with the InnoDB ReplicaSet\&. You can then administer the InnoDB ReplicaSet using the
rs
global variable, for example by issuing
rs\&.status()\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-redirect\-secondary\fR
.sp
Ensures that the target server is part of a single\-primary InnoDB Cluster or InnoDB ReplicaSet and if it is not a secondary, finds a secondary and connects to it\&. MySQL Shell exits with an error if any of the following is true when using this option:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
On an InnoDB Cluster, Group Replication is not active
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
InnoDB Cluster metadata does not exist
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
There is no quorum
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The cluster is not single\-primary and is running in multi\-primary mode
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
There is no secondary available, for example because there is just one server instance
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-result\-format={table|tabbed|vertical|json|json/pretty|ndjson|json/raw|json/array}\fR
.sp
Set the value of the
resultFormat
MySQL Shell configuration option for this session\&. Formats are as follows:
.PP
table
.RS 4
The default for interactive mode, unless another value has been set persistently for the
resultFormat
configuration option in the configuration file, in which case that default applies\&. The
\fB\-\-table\fR
alias can also be used\&.
.RE
.PP
tabbed
.RS 4
The default for batch mode, unless another value has been set persistently for the
resultFormat
configuration option in the configuration file, in which case that default applies\&. The
\fB\-\-tabbed\fR
alias can also be used\&.
.RE
.PP
vertical
.RS 4
Produces output equivalent to the
\eG
terminator for an SQL query\&. The
\fB\-\-vertical\fR
or
\fB\-E\fR
aliases can also be used\&.
.RE
.PP
json or json/pretty
.RS 4
Produces pretty\-printed JSON\&.
.RE
.PP
ndjson or json/raw
.RS 4
Produces raw JSON delimited by newlines\&.
.RE
.PP
json/array
.RS 4
Produces raw JSON wrapped in a JSON array\&.
.RE
.sp
If the
\fB\-\-json\fR
command line option is used to activate JSON wrapping for output for the session, the
\fB\-\-result\-format\fR
option and its aliases and the value of the
resultFormat
configuration option are ignored\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-save\-passwords={always|prompt|never}\fR
.sp
Controls whether passwords are automatically stored in the secret store\&.
always
means passwords are always stored unless they are already in the store or the server URL is excluded by a filter\&.
never
means passwords are never stored\&.
prompt, which is the default, means users are asked whether to store the password or not\&. See
Section\ \&4.4, \(lqPluggable Password Store\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-schema=\fR\fB\fIname\fR\fR,
\fB\-D \fR\fB\fIname\fR\fR
.sp
The default schema to use\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-server\-public\-key\-path=\fR\fB\fIfile_name\fR\fR
.sp
MySQL Shell equivalent of
\fB\-\-server\-public\-key\-path\fR\&.
.sp
If
\fB\-\-server\-public\-key\-path=\fR\fB\fIfile_name\fR\fR
is given and specifies a valid public key file, it takes precedence over
\fB\-\-get\-server\-public\-key\fR\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBImportant\fR
.ps -1
.br
Only supported with classic MySQL protocol connections\&.
.sp .5v
.RE
See
caching_sha2_password
plugin
\m[blue]\fBCaching SHA\-2 Pluggable Authentication\fR\m[]\&\s-2\u[4]\d\s+2\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-show\-warnings={true|false}\fR
.sp
When true is specified, which is the default, in SQL mode, MySQL Shell displays warnings after each SQL statement if there are any\&. If false is specified, warning are not displayed\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-socket[=\fR\fB\fIpath\fR\fR\fB]\fR,
\fB\-S \fR\fB\fI[path]\fR\fR
.sp
On Unix, when a path is specified, the path is the name of the Unix socket file to use for the connection\&. If you specify
\-\-socket
with no value and no equal sign, or
\-S
without a value, the default Unix socket file for the appropriate protocol is used\&.
.sp
On Windows, the path is the name of the named pipe to use for the connection\&. The pipe name is not case\-sensitive\&. On Windows, you must specify a path, and the
\-\-socket
option is available for classic MySQL protocol sessions only\&.
.sp
You cannot specify a socket if you specify a port or a host name other than
localhost
on Unix or a period (\&.) on Windows\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-sql\fR
.sp
Start in SQL mode, auto\-detecting the protocol to use if it is not specified as part of the connection information\&. When the protocol to use is not specified, defaults to an X Protocol connection, falling back to a classic MySQL protocol connection\&. To force a connection to use a specific protocol see the
\fB\-\-sqlx\fR
or
\fB\-\-sqlc\fR
options\&. Alternatively, specify a protocol to use as part of a URI\-like connection string or use the
\fB\-\-port\fR
option\&. See
Section\ \&4.3, \(lqMySQL Shell Connections\(rq
and
\m[blue]\fBMySQL Shell Ports\fR\m[]\&\s-2\u[7]\d\s+2
for more information\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-sqlc\fR
.sp
Start in SQL mode forcing the connection to use classic MySQL protocol, for example to use MySQL Shell with a server that does not support X Protocol\&. If you do not specify the port as part of the connection, when you provide this option MySQL Shell uses the default classic MySQL protocol port which is usually 3306\&. The port you are connecting to must support classic MySQL protocol, so for example if the connection you specify uses the X Protocol default port 33060, the connection fails with an error\&. See
Section\ \&4.3, \(lqMySQL Shell Connections\(rq
and
\m[blue]\fBMySQL Shell Ports\fR\m[]\&\s-2\u[7]\d\s+2
for more information\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-sqlx\fR
.sp
Start in SQL mode forcing the connection to use X Protocol\&. If you do not specify the port as part of the connection, when you provide this option MySQL Shell uses the default X Protocol port which is usually 33060\&. The port you are connecting to must support X Protocol, so for example if the connection you specify uses the classic MySQL protocol default port 3306, the connection fails with an error\&. See
Section\ \&4.3, \(lqMySQL Shell Connections\(rq
and
\m[blue]\fBMySQL Shell Ports\fR\m[]\&\s-2\u[7]\d\s+2
for more information\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-ssh=str\fR
.sp
Create an SSH tunnel that provides an encrypted connection to the MySQL server instance\&. Supply the URI for connection to the SSH server in the format
[user@]host[:port], for example:
.sp
.if n \{\
.RS 4
.\}
.nf
\fB\-\-ssh root@198\&.51\&.100\&.4:2222\fR
.fi
.if n \{\
.RE
.\}
.sp
When you use this option, you must also specify the
\fB\-\-user\fR,
\fB\-\-host\fR, and
\fB\-\-port\fR
options, or a URI, for connection to the MySQL server instance\&. For information on SSH tunnel connections from MySQL Shell, see
Section\ \&4.3.5, \(lqUsing an SSH Tunnel\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-ssh\-config\-file=path\fR
.sp
Specify the path to an SSH configuration file for the connection to the SSH server\&. You can use the MySQL Shell configuration option
ssh\&.configFile
to set a custom file as the default if this option is not specified\&. If
ssh\&.configFile
has not been set, the default is the standard SSH configuration file
~/\&.ssh/config\&. If you specify
\fB\-\-ssh\-config\-file\fR
with an empty value, the default file specified by
ssh\&.configFile
is ignored, and the
~/\&.ssh/config
file is used instead\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-ssh\-identity\-file=path\fR
.sp
Specify the path to an identity file for the connection to the SSH server\&. The default if this option is not specified is the standard private key file in the SSH configuration folder (~/\&.ssh/id_rsa)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-ssl*\fR
.sp
Options that begin with
\fB\-\-ssl\fR
specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. The
\fBmysqlsh\fR
SSL options function in the same way as the SSL options for MySQL Server, see
\m[blue]\fBCommand Options for Encrypted Connections\fR\m[]\&\s-2\u[8]\d\s+2
for more information\&.
.sp
\fBmysqlsh\fR
accepts these SSL options:
\fB\-\-ssl\-mode\fR,
\fB\-\-ssl\-ca\fR,
\fB\-\-ssl\-capath\fR,
\fB\-\-ssl\-cert\fR,
\fB\-\-ssl\-cipher\fR,
\fB\-\-ssl\-crl\fR,
\fB\-\-ssl\-crlpath\fR,
\fB\-\-ssl\-key\fR,
\fB\-\-tls\-version\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-syslog\fR
.sp
Send SQL statements that you issue in MySQL Shell\(cqs SQL mode to the operating system\(cqs system logging facility (syslog
on Unix, or the Windows Event Log)\&. System logging for SQL statements only takes place when MySQL Shell is started in interactive mode, so either a normal start or a start with the
\fB\-\-interactive\fR
option\&. It does not take place if the
\fB\-\-execute\fR
or
\fB\-\-file\fR
options are used at startup to run
mysqlsh
in batch mode\&. See
Section\ \&12.3, \(lqSystem Logging for SQL Statements\(rq
for more information\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-tabbed\fR
.sp
Display results in tab separated format in interactive mode\&. The default for that mode is table format\&. This option is an alias of the
\fB\-\-result\-format=tabbed\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-table\fR
.sp
Display results in table format in batch mode\&. The default for that mode is tab separated format\&. This option is an alias of the
\fB\-\-result\-format=table\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-uri=\fR\fB\fIstr\fR\fR
.sp
Create a connection upon startup, specifying the connection options in a URI\-like string as described at
\m[blue]\fBConnecting to the Server Using URI\-Like Strings or Key\-Value Pairs\fR\m[]\&\s-2\u[9]\d\s+2\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
The MySQL user name to use when connecting to the server\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-verbose[=0|1|2|3|4]\fR
.sp
Activate verbose output to the console and specify the level of detail\&. The value is an integer in the range from 0 to 4\&. 0 displays no messages, which is the default verbosity setting when you do not specify the option\&. 1 displays error, warning and informational messages (this is the default setting if you specify the option on the command line without a value)\&. 2, 3, and 4 add higher levels of debug messages\&. See
Chapter\ \&12, MySQL Shell Logging and Debug
for more information\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-version\fR,
\fB\-V\fR
.sp
Display the version of MySQL Shell and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-vertical\fR,
\fB\-E\fR
.sp
Display results vertically, as when the
\eG
terminator is used for an SQL query\&. This option is an alias of the
\fB\-\-result\-format=vertical\fR
option\&.
.RE
.SH "COPYRIGHT"
.br
.PP
Copyright \(co 2006, 2024, Oracle and/or its affiliates.
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "NOTES"
.IP " 1." 4
Using MySQL as a Document Store
.RS 4
\%https://dev.mysql.com/doc/refman/en/document-store.html
.RE
.IP " 2." 4
Using X Plugin with the Caching SHA-2 Authentication Plugin
.RS 4
\%https://dev.mysql.com/doc/refman/en/x-plugin-sha2-cache-plugin.html
.RE
.IP " 3." 4
FIDO Pluggable Authentication
.RS 4
\%https://dev.mysql.com/doc/refman/8.0/en/fido-pluggable-authentication.html
.RE
.IP " 4." 4
Caching SHA-2 Pluggable Authentication
.RS 4
\%https://dev.mysql.com/doc/refman/en/caching-sha2-pluggable-authentication.html
.RE
.IP " 5." 4
Available Authentication Plugins
.RS 4
\%https://dev.mysql.com/doc/refman/en/pluggable-authentication.html#pluggable-authentication-available-plugins
.RE
.IP " 6." 4
End-User Guidelines for Password Security
.RS 4
\%https://dev.mysql.com/doc/refman/en/password-security-user.html
.RE
.IP " 7." 4
MySQL Shell Ports
.RS 4
\%https://dev.mysql.com/doc/mysql-port-reference/en/mysql-port-reference-tables.html
.RE
.IP " 8." 4
Command Options for Encrypted Connections
.RS 4
\%https://dev.mysql.com/doc/refman/en/connection-options.html#encrypted-connection-options
.RE
.IP " 9." 4
Connecting to the Server Using URI-Like Strings or Key-Value Pairs
.RS 4
\%https://dev.mysql.com/doc/refman/en/connecting-using-uri-or-key-value-pairs.html
.RE
.SH AUTHOR
Oracle Corporation (http://dev.mysql.com/).
